DateTo2000 (Date, Number)

Basic and Crystal syntax.

Arguments
Returns

a date field with a four digit year

Action

Note:    

Examples

The following examples are applicable to Basic and Crystal syntax:

Here the window value is greater than the year and so it will change it to 20XX.

DateTo2000(CDate(1993,12,12), 99)

should return 2093/12/12

Here the window value is less than the year and so it will not change the year.

DateTo2000(CDate(1993,12,12), 92)

should return 1993/12/12

Other Examples

This is an example of a date that will not be affected by the function.

DateTo2000(CDate(1899,12,12), 99)

should return 1899/12/12

This is an example of a date that will not be affected by the function.

DateTo2000(CDate(100,12,12), 99)

should return 100/12/12

Some databases maintain the year of a date as a two digit field and so this will simulate that date field.

DateTo2000(CDate(98,12,12), 99)

should return 2098/12/12

DateTo2000(CDate(98,12,12), 97)

should return 1998/12/12

DateTo2000(CDate(9,12,12), 10)

should return 2009/12/12

DateTo2000(CDate(1,12,12), 0)

should return 1901/12/12



Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com